package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.SetmealDTO;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * PROJECT_NAME: sky-take-out
 * NAME: SetmealMapper
 *
 * @AUTHOR: zhang
 * DATE: 2023/11/24
 * DESCRIPTION :
 */
@Mapper
public interface SetmealMapper {
    /**
     * 修改套餐信息
     * @param setmeal
     */
    void update(@Param("setmeal") Setmeal setmeal);

    Page<SetmealVO> getPage(@Param("pageQueryDTO") SetmealPageQueryDTO pageQueryDTO);

    void insert(@Param("setmeal") Setmeal setmeal);

    Setmeal selectSetmeal(@Param("setmealId") Long setmealId);

    void batchDelete(@Param("ids") List<Long> ids);

    void updateSetmeal(@Param("setmeal") Setmeal setmeal);

    /**
     * 根据分类id查询套餐列表
     * @param setmeal (分类id+状态：启用)
     * @return
     */
    List<Setmeal> selectSetmealByCategoryId(@Param("setmeal") Setmeal setmeal);
}
